<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.jfinal.plugin.activerecord.Record"%>
<%@ page import="java.util.List"%>
<%
	List<Record> orgList = (List<Record>) request.getAttribute("ORG_LIST");
	String tabOrgId = "3";
	if (!orgList.isEmpty()) {
		tabOrgId = orgList.get(0).get("org_id").toString();
	}

	//System.out.println(">>>" + orgList.size());
%>

<div class="row dashboard-panel dashboard-panel-top">
	<div class="row titleStyle">
		<div class="col-xs-12 ">
			<img src="../../mainpage/img/blue_line.png" />
			<lable>&nbsp;&nbsp;在线航班</lable>
		</div>
	</div>

	<div id="dp_device_menu">
		<ul id="dp_device_tabs" class="nav nav-tabs">
			<%
				String activeFlag = "";
				if (!orgList.isEmpty()) {
					for (int i = 0; i < orgList.size(); i++) {
						Record vo = orgList.get(i);
						if (i == 0) {
							activeFlag = "active";
						} else {
							activeFlag = "";
						}
			%>
			<li class="<%=activeFlag%>"><a
				href="#dp_tab_<%=vo.get("org_id")%>" data-toggle="tab"
				onclick="PLANE_DEVICE.loadPlanes('<%=vo.get("org_id")%>');"><%=vo.get("name")%></a></li>

			<%
				}
				}
			%>

		</ul>
	</div>
	<div id="dp_content" class="tab-content padding-lr-5">
		<%
			String activeFlag0 = "";
			if (!orgList.isEmpty()) {
				for (int i = 0; i < orgList.size(); i++) {
					Record vo = orgList.get(i);
					if (i == 0) {
						activeFlag0 = "active";
					} else {
						activeFlag0 = "";
					}
		%>
		<div class="tab-pane fade in <%=activeFlag0%>"
			id="dp_tab_<%=vo.get("org_id")%>">
			<div class="row dashboard-panel-table">
				<table id="dp_plane_table_<%=vo.get("org_id")%>" class="table ">
					<thead>
						<tr>
							<th>机尾号</th>
							<th>航班号</th>

							<th>航线</th>
							<th>起飞/到达时间</th>
							<th>wifi使用人数</th>
							<th>操作</th>
						</tr>
					</thead>
				</table>
			</div>
		</div>

		<%
			}
			}
		%>

	</div>
</div>
